<?php
class Pages extends CI_Controller {
    public function __construct()
    {
        parent::__construct();
        $this->load->model('UserManager');
        $this->load->helper('url_helper');
    }
	public function index()
    {
        $data = $this->UserManager->get_news();
		$data=array('data'=>$data);
		echo json_encode($data);
    }

    public function view($page = 'home')
    {
		echo $page;
    }
	public function view1($slug = false)
    {
        $data['news_item'] = $this->UserManager->get_news($slug);
    }
}